package spring.cloud.tasks.executor.trigger;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import spring.cloud.tasks.executor.task.TaskExecuteEngine;

@Slf4j
@Setter
@Getter
public abstract class AbstractTrigger implements Trigger {
    protected TaskExecuteEngine taskExecuteEngine;

    public void init(TaskExecuteEngine taskExecuteEngine) {
        this.taskExecuteEngine = taskExecuteEngine;
    }

    @Override
    public Triggered createTriggered(boolean yes) {
        Triggered triggered = new Triggered();
        triggered.setYes(yes);

        return triggered;
    }

}
